package com.dxysun.spring;

import com.dxysun.spring.service.MyService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringMain
{
    public static void main(String[] args)
    {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring.xml");

//        HelloService helloService = applicationContext.getBean(HelloService.class);
        MyService myService = applicationContext.getBean(MyService.class);

        System.out.println("get helloService：" + myService.getHelloService());
        System.out.println(myService);
        System.out.println(myService.getHelloStr());
    }
}
